package cn.yuanqiao.archive.supervision.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 督察指导附件对象 YQSUPERVISION_FILE
 * 
 * @author xy
 * @date 2023-08-01
 */
public class SupervisionFile extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQSUPERVISION_FILE";

    public SupervisionFile() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("tenantCode is null");

        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }
    /** id */
    @IdAnnotation
    private Long id;

    /** 督察指导Id */
    @Excel(name = "督察指导Id")
    private Long supervisionId;

    /** 路径 */
    @Excel(name = "路径")
    private String path;

    /** 文件名 */
    @Excel(name = "文件名")
    private String docName;

    /** 文件类型 */
    @Excel(name = "文件类型")
    private String docType;

    /** 文件大小 */
    @Excel(name = "文件大小")
    private String fileSize;

    /** 保存名字 */
    @Excel(name = "保存名字")
    private String realDocName;

    /** 地址 */
    @Excel(name = "地址")
    private String docMnt;

    /** 创建人 */
    @Excel(name = "创建人")
    private Long createId;

    /** 是否删除 */
    @Excel(name = "是否删除")
    private Integer isDel;

    private String tableName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setSupervisionId(Long supervisionId) 
    {
        this.supervisionId = supervisionId;
    }

    public Long getSupervisionId() 
    {
        return supervisionId;
    }
    public void setPath(String path) 
    {
        this.path = path;
    }

    public String getPath() 
    {
        return path;
    }
    public void setDocName(String docName) 
    {
        this.docName = docName;
    }

    public String getDocName() 
    {
        return docName;
    }
    public void setDocType(String docType) 
    {
        this.docType = docType;
    }

    public String getDocType() 
    {
        return docType;
    }
    public void setFileSize(String fileSize)
    {
        this.fileSize = fileSize;
    }

    public String getFileSize()
    {
        return fileSize;
    }
    public void setRealDocName(String realDocName) 
    {
        this.realDocName = realDocName;
    }

    public String getRealDocName() 
    {
        return realDocName;
    }
    public void setDocMnt(String docMnt) 
    {
        this.docMnt = docMnt;
    }

    public String getDocMnt() 
    {
        return docMnt;
    }
    public void setCreateId(Long createId)
    {
        this.createId = createId;
    }

    public Long getCreateId()
    {
        return createId;
    }
    public void setIsDel(Integer isDel) 
    {
        this.isDel = isDel;
    }

    public Integer getIsDel() 
    {
        return isDel;
    }


    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("supervisionId", getSupervisionId())
            .append("path", getPath())
            .append("docName", getDocName())
            .append("docType", getDocType())
            .append("fileSize", getFileSize())
            .append("realDocName", getRealDocName())
            .append("docMnt", getDocMnt())
            .append("createId", getCreateId())
            .append("createTime", getCreateTime())
            .append("isDel", getIsDel())
            .toString();
    }
}
